module.exports={
    add(data){
        return request({
            url: '/terminal',
            headers: {},
            method: 'post',
            data: data
        });
    },
    edit(data){
        return request({
            url: '/terminal',
            headers: {},
            method: 'put',
            data: data
        });
    },
    remove(data){
        return request({
            url: '/terminal/'+data,
            headers: {},
            method: 'delete'
        });
    },
    list(data){
        return request({
            url: '/terminal/list',
            headers: {},
            method: 'get',
            params: data
        });
    },
    call(code,msg){
        return request({
            url: `/terminal/${code}/call`,
            headers: {},
            method: 'get',
            params: {msg:msg}
        });
    },
    listBySw(data){
        return request({
            url: '/terminal/list-by-sw',
            headers: {},
            method: 'get',
            params: data
        });
    },
    createDevice(code){
        return request({
            url: `/terminal/${code}/create-device`,
            headers: {},
            method: 'get'
        });
    },
}
